package com.wsoft.hr.pm.enums;

import lombok.Getter;

/**
 * 考核流程-卡片审核类型
 *
 * @author zhonglj
 * @return
 * @date 2025/3/1 10:54
 **/
@Getter
public enum ProcessCardAssignTypeEnum {
    /**
     * 被考核人
     */
    ASSIGN_SELF("assignSelf", "被考核人"),
    /**
     * 直接领导
     */
    DIRECT_LEADER("directLeader", "直接领导"),
    /**
     * 部门经理
     */
    DEPARTMENT_MANAGER("departmentManager", "部门经理"),
    /**
     * 指定人员
     */
    ASSIGN_PERSON("assignPerson", "指定人员");

    private final String type;
    private final String desc;

    ProcessCardAssignTypeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static ProcessCardAssignTypeEnum getByType(String type) {
        for (ProcessCardAssignTypeEnum value : values()) {
            if (value.type.equals(type)) {
                return value;
            }
        }
        return null;
    }
}
